PBMPLUS is a toolkit for converting various image formats to and from
portable formats, and therefore to and from each other. The idea is,
if you want to convert among N image formats, you only need 2*N
conversion filters, instead of the N^2 you would need if you wrote each
one separately.
The package is broken up into four parts. First is PBM, for bitmaps (1
bit per pixel). Then there is PGM, for grayscale images. Next is PPM,
for full-color images. Last, there is PNM, which does content-independent manipulations on any of the three internal formats, and also handles external formats that have multiple types.